package vcp.gui.forms.validators;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * General string validator
 *
 */
public class TextAreaValidator {
	private Pattern pattern;
	private Matcher matcher;
	private static final String PATTERN = "^[a-zA-Z0-9!@#$%^&*()=~?_-]{0,500}$";
	public TextAreaValidator(){
		pattern = Pattern.compile(PATTERN);
	}	
	public boolean validate(String txt){
		 
		  matcher = pattern.matcher(txt);		
		  return matcher.matches();
	}
	
}
